﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Jermaine.Serialization
{
    /// <summary>
    /// Serializer
    /// </summary>
    public interface ISerializer
    {
        /// <summary>
        /// serialize
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="path"></param>
        /// <param name="o"></param>
        void Serialize<T>(String path, T o) where T : new();
        /// <summary>
        /// Deserialize
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="path"></param>
        /// <returns></returns>
        T Deserailize<T>(String path);

        /// <summary>
        /// 
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="o"></param>
        /// <returns></returns>
        String Format<T>(T o);

        /// <summary>
        /// 
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="o"></param>
        /// <returns></returns>
        T Parse<T>(String stringObject);
    }
}
